/* koa-router 传参 ctx.query */
const Koa = require('koa');
const Router = require('koa-router');
const app = new Koa();
const router = new Router();

router.get('/', function(ctx, next){
	// ctx.body = "Hello CJTY!";
	ctx.body = ctx.query;
});

app
.use(router.routes())
.use(router.allowedMethods());
app.listen(3000, ()=>{
    console.log('[demo] server is starting at port 3000');
})